num = eval(input("请输入数字："))

e = 1
for i in range(1,num):
    temp = 1
    for j in range(i,0,-1):
        temp *= j
    e += 1/temp

print(e)